# Replication Materials for "Leaders Online: Social Media Communication by Political Leaders Across Regime Types"

Authors:
- Philipp Zimmer, Massachusetts Institute of Technology, World Bank Group
- Sarah Hummel, Harvard University

This repository contains the replication materials for the paper titled "Leaders Online: Social Media Communication by Political Leaders Across Regime Types" by Philipp Zimmer and Sarah Hummel as submitted for publication in the "Political Research Quarterly" journal.

## Directory:

  - **data-tweets**: Data on the tweet level.
  - **data-day**: Data aggregated on a daily basis.
  - **data-raw-tweets-african-leaders**: Raw tweets by African leaders for language comparison
  - **data-raw-tweets-trudeau**: Raw tweets by Trudeau for language comparison
  - **data-sentiment-model-comparison**
  - **data-language-test**

  - **python-xlm-roberta-sentiment-modeling.ipynb**: Code for preprocessing and generating the sentiment scores.
  - **r-main-analyses.R**: Code for main analyses in manuscript and appendix
  - **r-sentiment-model-comparison**: Codes related to regression analyses.
  - **python-vader-sentiment-modeling**: Code for preprocessing and generating the sentiment scores.


## Getting Started:

  Most of the analysis is found in r-main-analyses. We recommend you start with this file. 

## Contact:
For any questions or clarifications, please reach out to:
- Philipp Zimmer at [philippz@mit.edu](mailto:philippz@mit.edu)
- Sarah Hummel at [sarah_hummel@fas.harvard.edu](mailto:sarah_hummel@fas.harvard.edu)

We appreciate your interest in our research and hope that these materials aid in understanding and validating our work.

